package cn.wolfcode.p2p.base.util;

import cn.wolfcode.p2p.base.exception.DisplayableException;

import java.math.BigDecimal;

/**
 * Created by wolfcode on 2018/7/20.
 */
public class AssertUtil {
	/**
	 * 判断字符串是否为null
	 * 
	 * @param param
	 * @param message
	 */
	public static void isNotNull(String param, String message) {
		if (param == null || "".equals(param.trim())) {
			throw new DisplayableException(message);
		}
	}

	/**
	 * 判断金额是否为null
	 * 
	 * @param param
	 * @param message
	 */
	public static void isNotNull(Object param, String message) {
		if (param == null) {
			throw new DisplayableException(message);
		}
	}

	public static void isTrue(boolean param, String message) {
		if (!param) {
			throw new DisplayableException(message);
		}
	}
}
